package br.com.knowledge.persistence.hibernate.entities;

import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * AbdStroredprocedureinferencia entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "abd_stroredprocedureinferencia", schema = "public")
public class AbdStroredprocedureinferencia implements java.io.Serializable {

	// Fields

	private AbdStroredprocedureinferenciaId id;
	private BcdStoredprocedure bcdStoredprocedure;
	private BcdColunas bcdColunas;

	// Constructors

	/** default constructor */
	public AbdStroredprocedureinferencia() {
	}

	/** full constructor */
	public AbdStroredprocedureinferencia(AbdStroredprocedureinferenciaId id,
			BcdStoredprocedure bcdStoredprocedure, BcdColunas bcdColunas) {
		this.id = id;
		this.bcdStoredprocedure = bcdStoredprocedure;
		this.bcdColunas = bcdColunas;
	}

	// Property accessors
	@EmbeddedId
	@AttributeOverrides( {
			@AttributeOverride(name = "bcdStoredprocedureId", column = @Column(name = "bcd_storedprocedure_id", nullable = false)),
			@AttributeOverride(name = "bcdColunasId", column = @Column(name = "bcd_colunas_id", nullable = false)),
			@AttributeOverride(name = "tipoacao", column = @Column(name = "tipoacao", nullable = false, length = 1)),
			@AttributeOverride(name = "id", column = @Column(name = "id")) })
	public AbdStroredprocedureinferenciaId getId() {
		return this.id;
	}

	public void setId(AbdStroredprocedureinferenciaId id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "bcd_storedprocedure_id", nullable = false, insertable = false, updatable = false)
	public BcdStoredprocedure getBcdStoredprocedure() {
		return this.bcdStoredprocedure;
	}

	public void setBcdStoredprocedure(BcdStoredprocedure bcdStoredprocedure) {
		this.bcdStoredprocedure = bcdStoredprocedure;
	}

	
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "bcd_colunas_id", nullable = false, insertable = false, updatable = false)
	public BcdColunas getBcdColunas() {
		return this.bcdColunas;
	}

	
	public void setBcdColunas(BcdColunas bcdColunas) {
		this.bcdColunas = bcdColunas;
	}

}